package com.ruoyi.member.constant;

import com.alibaba.fastjson.JSON;
import com.ruoyi.member.model.MapProvinceCityVO;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/***
 * 中国城市省份分布
 */
public class CityInfoConstant {

    private static Map<String, String> provinceMap = new HashMap<>();

    static {

        provinceMap.put("110000" , "北京");
        provinceMap.put("120000" , "天津");
        provinceMap.put("310000" , "上海");
        provinceMap.put("500000" , "重庆");
        provinceMap.put("130000" , "河北");
        provinceMap.put("410000" , "河南");
        provinceMap.put("530000" , "云南");
        provinceMap.put("210000" , "辽宁");
        provinceMap.put("230000" , "黑龙江");
        provinceMap.put("430000" , "湖南");
        provinceMap.put("340000" , "安徽");
        provinceMap.put("370000" , "山东");
        provinceMap.put("650000" , "新疆");
        provinceMap.put("320000" , "江苏");
        provinceMap.put("330000" , "浙江");
        provinceMap.put("360000" , "江西");
        provinceMap.put("420000" , "湖北");
        provinceMap.put("450000" , "广西");
        provinceMap.put("620000" , "甘肃");
        provinceMap.put("140000" , "山西");
        provinceMap.put("150000" , "内蒙古");
        provinceMap.put("610000" , "陕西");
        provinceMap.put("220000" , "吉林");
        provinceMap.put("350000" , "福建");
        provinceMap.put("520000" , "贵州");
        provinceMap.put("440000" , "广东");
        provinceMap.put("630000" , "青海");
        provinceMap.put("540000" , "西藏");
        provinceMap.put("510000" , "四川");
        provinceMap.put("640000" , "宁夏");
        provinceMap.put("460000" , "海南");
        provinceMap.put("710000" , "台湾");
        provinceMap.put("810000" , "香港");
        provinceMap.put("820000" , "澳门");

    }

    public static MapProvinceCityVO getMapProvinceInfoByCode(String provinceCode) {
        MapProvinceCityVO provinceCityVO = new MapProvinceCityVO();
        provinceCityVO.setCode(provinceCode);
        provinceCityVO.setName(provinceMap.get(provinceCode));
        return provinceCityVO;
    }
}
